package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.entity.BrandTaste;
import com.sikaryofficial.backend.domain.vo.export.ProductExportVO;
import com.sikaryofficial.backend.domain.vo.export.ProductQrExportVO;
import com.sikaryofficial.system.api.model.product.BrandTasteDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 实体转换
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface BrandTasteMapping {
    BrandTasteMapping INSTANCE = Mappers.getMapper(BrandTasteMapping.class);

    /**
     * 实体映射entity
     *
     * @param brandTaste
     * @return
     */
    BrandTaste coverDtoToEntity(BrandTasteDTO brandTaste);

    /**
     * 实体映射entity
     *
     * @param brandTasteList
     * @return
     */
    List<BrandTaste> coverToEntityList(List<BrandTasteDTO> brandTasteList);

    /**
     * 实体映射resp
     *
     * @param brandTaste
     * @return
     */
    BrandTasteDTO coverToDTO(BrandTaste brandTaste);

    /**
     * 实体映射resp
     *
     * @param brandTaste
     * @return
     */
    ProductQrExportVO coverToExportQrVO(BrandTasteDTO brandTaste);


    ProductQrExportVO coverQrVOToQrVO(ProductQrExportVO productQrExportVO);
    /**
     * 实体集合映射resp
     *
     * @param brandTasteList
     * @return
     */
    List<BrandTasteDTO> coverListToDTO(List<BrandTaste> brandTasteList);

    /**
     * 实体映射resp
     *
     * @param brandTaste
     * @return
     */
    @Mapping(source = "brandNo", target = "brandNoEn")
    @Mapping(source = "model", target = "modelEn")
    @Mapping(source = "tasteName", target = "tasteNameEn")
    @Mapping(source = "style", target = "styleEn")
    @Mapping(source = "productName", target = "productNameEn")
    @Mapping(source = "qrTitle", target = "qrTitleEn")
    @Mapping(source = "remark", target = "productIntroduceEn")
    @Mapping(source = "remarkCn", target = "productIntroduceCn")
    @Mapping(source = "brandNoCn", target = "brandNoCn")
    @Mapping(source = "modelCn", target = "modelCn")
    @Mapping(source = "tasteNameCn", target = "tasteNameCn")
    @Mapping(source = "styleCn", target = "styleCn")
    @Mapping(source = "productNameCn", target = "productNameCn")
    ProductExportVO coverToExportVO(BrandTaste brandTaste);

    /**
     * 实体集合映射resp
     *
     * @param brandTasteList
     * @return
     */
    List<ProductExportVO> coverListToExportVO(List<BrandTaste> brandTasteList);

}
